using System;
using System.Dynamic;
using System.Runtime.CompilerServices;
using ns16;
using ns20;

namespace Newtonsoft.Json.Serialization
{
	public class JsonDynamicContract : JsonContainerContract
	{
		private readonly Class179<string, CallSite<Func<CallSite, object, object>>> class179_0 = new Class179<string, CallSite<Func<CallSite, object, object>>>(smethod_2);

		private readonly Class179<string, CallSite<Func<CallSite, object, object, object>>> class179_1 = new Class179<string, CallSite<Func<CallSite, object, object, object>>>(smethod_3);

		[CompilerGenerated]
		private JsonPropertyCollection jsonPropertyCollection_0;

		[CompilerGenerated]
		private Func<string, string> func_1;

		public JsonPropertyCollection Properties
		{
			[CompilerGenerated]
			get
			{
				return jsonPropertyCollection_0;
			}
			[CompilerGenerated]
			private set
			{
				jsonPropertyCollection_0 = value;
			}
		}

		public Func<string, string> PropertyNameResolver
		{
			[CompilerGenerated]
			get
			{
				return func_1;
			}
			[CompilerGenerated]
			set
			{
				func_1 = value;
			}
		}

		private static CallSite<Func<CallSite, object, object>> smethod_2(string string_0)
		{
			GetMemberBinder innerBinder = (GetMemberBinder)Class158.Class159.smethod_3(string_0, typeof(Class158));
			return CallSite<Func<CallSite, object, object>>.Create(new Class160(innerBinder));
		}

		private static CallSite<Func<CallSite, object, object, object>> smethod_3(string string_0)
		{
			SetMemberBinder innerBinder = (SetMemberBinder)Class158.Class159.smethod_4(string_0, typeof(Class158));
			return CallSite<Func<CallSite, object, object, object>>.Create(new Class161(innerBinder));
		}

		public JsonDynamicContract(Type underlyingType)
			: base(underlyingType)
		{
			enum15_0 = Enum15.Dynamic;
			Properties = new JsonPropertyCollection(base.UnderlyingType);
		}

		internal bool method_5(IDynamicMetaObjectProvider idynamicMetaObjectProvider_0, string string_0, out object object_0)
		{
			Class204.smethod_2(idynamicMetaObjectProvider_0, "dynamicProvider");
			CallSite<Func<CallSite, object, object>> callSite = class179_0.method_0(string_0);
			object obj = callSite.Target(callSite, idynamicMetaObjectProvider_0);
			if (!object.ReferenceEquals(obj, Class162.object_0))
			{
				object_0 = obj;
				return true;
			}
			object_0 = null;
			return false;
		}

		internal bool method_6(IDynamicMetaObjectProvider idynamicMetaObjectProvider_0, string string_0, object object_0)
		{
			Class204.smethod_2(idynamicMetaObjectProvider_0, "dynamicProvider");
			CallSite<Func<CallSite, object, object, object>> callSite = class179_1.method_0(string_0);
			object objA = callSite.Target(callSite, idynamicMetaObjectProvider_0, object_0);
			return !object.ReferenceEquals(objA, Class162.object_0);
		}
	}
}
